package stateAAs.animator {
	import com.greensock.TweenLite;
	
	import org.agony2d.gpu.AAFacade;
	import org.agony2d.gpu.StateAA;
	import org.agony2d.gpu.TingedAnimatorAA;
	import org.agony2d.gpu.UntingedAnimatorAA;
	import org.agony2d.gpu.core.AnimatorAA;
	import org.agony2d.timer.DelayManager;
	import org.agony2d.utils.MathUtil;
	
public class ManyAnimator_StateAA extends StateAA {
  
	/** overwritable... */
	override public function get smoothing() : Boolean {
		return true
	}
	
	override public function get tinted():Boolean{
		return true
	}
	
	/** overwrite... */
	override public function get fullTex() : String {
		return "atlas"
	}
	
	private var m_animator:TingedAnimatorAA
	private var m_animator_A:TingedAnimatorAA
	
	override public function enter():void {
		var l:int
		
		this.group.interactive = false
		l = this.stateArgs[0]
		while(--l>-1){
			m_animator_A = new TingedAnimatorAA(AAFacade.getSheet("flight"))
			this.group.addNode(m_animator_A)
			m_animator_A.x = Math.random() * 650 + 100 
			m_animator_A.y = Math.random() * 400 + 100
			m_animator_A.pivotX = m_animator_A.pivotY = 110
			m_animator_A.color = Math.random() * 0xffffff
			m_animator_A.alpha = MathUtil.random(0.4, 1)
			m_animator_A.setActionByClipIndex(0, 1, 0).speedRatio = 1.5
			m_animator_A.setActionByClipIndex(1, 2, 1).speedRatio = MathUtil.random(0.5, 2)
			m_animator_A.play([1,0])
		}

	}
	
}
}